﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using Microsoft.Win32;

namespace SMS
{
    public class SysHelper
    {
        //短信猫OXC控件ID{BF1F5A07-0538-4624-BFBD-D1CE80AFE6A4}
        [DllImport("ZogLabSMS.ocx")]
        public static extern int DllRegisterServer();//注册时用
        [DllImport("ZogLabSMS.ocx")]
        public static extern int DllUnregisterServer();//取消注册时用

        /// <summary>
        /// 检测短信猫OXC是否注册
        /// </summary>
        public static void CheckOcx()
        {
            //RegistryKey regKey = Registry.ClassesRoot.OpenSubKey("CLSID\\{BF1F5A07-0538-4624-BFBD-D1CE80AFE6A4}\\");

            //if (regKey == null)
            //{
            //    DllRegisterServer();
            //}
        }
    }
}
